import { defineConfig } from 'vite';
import uni from '@dcloudio/vite-plugin-uni';
import vueJsx from '@vitejs/plugin-vue-jsx';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    uni(),
    vueJsx(),
    // 忽略 node_modules 中的 Sass 警告
    {
      name: 'suppress-sass-warnings', configResolved: (config) => {
        config.logger.warn = (msg, options) => {
          if (!options?.text.includes('node_modules')) {
            console.warn(msg);
          }
        };
      },
    },
  ],
});
